# 床底取牌
# 2025/5/1

def min_required_cards(n, k):
    if n <= 0 or k < 2:
        return 0  # 边界条件处理
    return (n - 1) * k + 2


if __name__ == '__main__':
    print(min_required_cards(6, 5))
